package demo.java.springboot.mybatis.sys.po;

import java.util.Date;
import java.util.List;


/**
 * 用户
 * @author MyTangJie
 *
 */
public class User {
	/**
	 * id：生成策略为自动增长
	 */
	private String id;
	
	/**
	 * 用户名
	 */
	private String loginName;
	
	/**
	 * 登录密码
	 */
	private String password;
	
	/**
	 * 创建时间：注解@Temporal会将当前的Date匹配到数据库中的Date类型
	 */
	private Date createTime = new Date();
	
	/**
	 * 描述
	 */
	private String description;
	
	/**
	 * 角色集合：多对多到角色
	 */
	private List<Role> roles;

	public User(String loginName) {
		super();
		this.loginName = loginName;
	}

	public User() {
		super();
		// TODO Auto-generated constructor stub
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getLoginName() {
		return loginName;
	}

	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public List<Role> getRoles() {
		return roles;
	}

	public void setRoles(List<Role> roles) {
		this.roles = roles;
	}
	
}
